using System.Web.UI.WebControls;

using SBPweb.Data;

namespace SBPweb.Controls.Web
{

    public delegate void EntityGridViewUpdatedEventHandler(object sender, EntityGridViewUpdatedEventArgs e);

    public class EntityGridViewUpdatedEventArgs : GridViewUpdatedEventArgs
    {

		#region Private field

		private Entity mEntity;
		private int mIndex;

		#endregion

		#region Constructor logic

		internal EntityGridViewUpdatedEventArgs(int rowIndex, Entity entity)
			: base(1, null)
		{
			mIndex = rowIndex;
			mEntity = entity;
		}

        internal EntityGridViewUpdatedEventArgs(GridViewUpdatedEventArgs originalArgs, Entity entity)
			:base(originalArgs.AffectedRows, null)
		{

		}

		#endregion

        #region Public properties

        public Entity RowEntity
        {
            get
            {
                return mEntity;
            }
            protected internal set
            {
                mEntity = value;
            }
        }

        #endregion

    }

}